<?php

namespace App\ApiBackend\Role;

use App\Http\Controllers\ApiBaseController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

/**
 *  角色菜单列表
 */
class MenuList extends ApiBaseController
{
  private array $searchMap = [
  ];


  /**
   * 参数检查
   */
  protected function check(): void
  {

  }

  /**
   * 业务主体
   */
  protected function service(): void
  {
    $listData = DB::table('admin_role_menu as aa')
      ->orderBy("aa.adminRoleId", "ASC")
      ->where('adminRoleId', \request('adminRoleId'))
      ->pluck("aa.adminMenuId");
    //搜索条件
    empty($listData) && $listData = [];
    //返回结果
    $this->result["data"] = $listData;
    return;
  }
}
